<?php
//20110605.006
$clientParams = array(
  "location" => "http://vsp.pbxsms.com/api.php",
  "uri" => "urn:xmethods-delayed-quotes",
  "login" => "username",
  "password" => "password",
);



//Send Voice SMS
$callParams = array(
  "source" => "123456789",
  "destination" => "44123123123;44654543455;44656565665",
  "scheduleTimestamp" => 0,
  "audio" => "AdioDataBase64Encoded",
);
$client = new SoapClient(null, $clientParams);
try {
  $answer = $client->__soapCall("sendsms", $callParams, array("uri"=>"urn:xmethods-delayed-quotes"));
} catch(SoapFault $fault) {
  var_dump($fault);
}
echo("<pre>" . htmlentities(print_r($answer, true), ENT_QUOTES, "utf-8", false) . "</pre>");



//Show status of last 3 SMSs
$callParams = array(
  "source" => "123456789",
);
$client = new SoapClient(null, $clientParams);
try {
  $answer = $client->__soapCall("getstatus", $callParams, array("uri"=>"urn:xmethods-delayed-quotes"));
} catch(SoapFault $fault) {
  var_dump($fault);
}
echo("<pre>" . htmlentities(print_r($answer, true), ENT_QUOTES, "utf-8", false) . "</pre>");
?>